package com.gouying.design.patterns.factory.method;

/**
 * 核心就是创建时候 提升一级 抽象方法
 */
public class FactoryMethodMain {
    public static void main(String[] args) {
        AbstractTransportFactory transportFactory = new BenZiCarFactory();
        Transport1 fly = transportFactory.createTransport();
        fly.run();

        AbstractTransportFactory transportFactory2 = new ZooFactory();
        Transport1 fly1 = transportFactory2.createTransport();
        fly1.run();
    }
}
